package com.zzl.car.mapper;

import com.github.pagehelper.PageInfo;
import com.zzl.car.entity.CarOrder;
import com.zzl.car.entity.Insurance;
import com.zzl.car.entity.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

public interface ZzwInsuranceMapper {
    /*
     *获取所有的车辆服务保障
     */
    public List<Insurance> getAllInsurance();

    /*
     *通过 name 和 state 模糊查询
     */
    public List<Insurance> searchInsurance(@Param("name")String name, @Param("state")Integer state);

    /*
     *
     */
    public List<User> getUserBaseInfo(@Param("name")String name, @Param("gender")Integer gender);

    /*
     *添加服务保障信息
     */
    public int addInsurance(@Param("in") Insurance in);

    /*
     *通过id 删除车辆服务保障信息
     */
    public int deleteInsurance(@Param("id") Integer id);

    /*
     *更新车辆服务保障信息
     */
    public int updateInsurance(@Param("in") Insurance in);

    /*
     *通过id 获取服务保障信息
     */
    public List<CarOrder> getOrderByInsuranceId(@Param(("id"))Integer id);
}
